package Collection;

import java.util.ArrayList;
import java.util.Collection;

public class newForDemo {
    public static void main(String[] args) {
        String[] array = {"one","two","three","four","five"};
//        Integer[] integers = {1,2,10,23,564,2544};
//        for (int i: integers){
//            int x = integers[i];
//            System.out.println(x);
//        }
        for (String s : array) {
            System.out.println(s);
        }
        Collection c = new ArrayList();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("four");
        c.add("five");
        for (Object o : c) {
            String str = (String) o;
            System.out.println(str);
        }

    }
}
